Skip to content

Conversation

EgorkaKulikov
Copy link
Collaborator

Description

Usually we remember the state of a static variable before the main body of each generated test and restore this state at the end. But enum constants are such statics that do not require such actions.

Fixes # (1397)
Fixes # (306)

Type of Change

  • Minor bug fix (non-breaking small changes)

How Has This Been Tested?

Manual Scenario

  • Scenarios described in both mentioned issues
  • Standard enums regression

@EgorkaKulikov EgorkaKulikov force-pushed the egor/enums_against_statics_and_reflection branch from b90c6c1 to 38bf5fd Compare November 25, 2022 09:03
@@ -74,6 +75,7 @@ class ComplexEnumExamplesTest : UtValueTestCaseChecker(
}

@Test
@Disabled("TODO: nested anonymous classes are not supported: https://github.com/UnitTestBot/UTBotJava/issues/617")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that the reason for disabling here differs from issue mentioned in 617, so maybe create an another issue?

@EgorkaKulikov EgorkaKulikov merged commit 4b9ca2d into main Nov 25, 2022
@EgorkaKulikov EgorkaKulikov deleted the egor/enums_against_statics_and_reflection branch November 25, 2022 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enum instantiating with unnecessary reflection Static Enum values are needlessly overwritten
2 participants